The Trust survey is conducted all over the world to find citizen’s trust on public organizations and professions. The trust data was collected in Nepal, in 2014 with about 2400 respondents. The respondents were selected from 48 different Village Development Committees (VDCs) of different constituencies across the country. The respondents were selected from the voter’s list. These data was entered into the computer and saved to different filenames for each constituencies.
Here, the data is read, merged, cleaned and frequency tables and plos are generated for Exploratory analysis.
All the data files from differnt constituencies are fed to the analysis.
#list all files in current working directory
fileList<-dir()
#SPSS files have .sav extension. filter files with .sav
fileList<-fileList[grep(".sav",fileList)]
#read first file to make initial data frame
#data<-read.spss(fileList[1],to.data.frame=TRUE,reencode='utf-8')
#Keep all but first file already read
#fileList<-fileList[2:length(fileList)]
Only one file is available so skip other files
#read.spss gives warnings, but it can be safely ignored
#for(file in fileList) {
# readData<-read.spss(file,to.data.frame=TRUE,reencode='utf-8')
# data<-rbind(data,readData[,1:202])
#}
Since we have merged all data to one file, we can also skip above steps and read only one merged file. In this case however, We have read individual files instead of merged file.
#Read combined file
data<-read.spss("Nepal-Trust-Survey-2014-all.sav",to.data.frame=T,reencode="utf-8")
#Take only first 202 rows
#attributes(data)
dim(data)
## [1] 2404 202
#data<-data[,1:202]
The original data contains 202 columns. Some might have created extra column names unknowingly while entering data. Some might have inserted blank records in SPSS. We will discard all the records that does not contain either respondentID, or Gender or Age. We will also discard all the columns right to column number 202.
dim(data)
## [1] 2404 202
data<-data[(!is.na(data$id)) | (!is.na(data$aq1)) | (!is.na(data$aq2)),]
dim(data)
## [1] 2404 202
Data files contains variable labels. We will read these variable labels to a new variable and store for future use.
##Find variable labels #variableLabels<-attr(mydata,"variable.labels")
variableLabels<-character()
for(i in 1:202){variableLabels[i]<-attr(data,"variable.labels")[[i]]}
Column names should be renamed to some meaningful names. The labels obtained from variable labels attribute of SPSS file should be cleaned before using as column names of data frame. At this stage this is commented out because using question number in variable name is easier for me. For other users, it might be easier to use meaningful variable names. There are two types of names: one - replaced spaces and other illegal charactors to dots “.” and Two: remove all punctuation marks altogether. Remove single hashses to get dot separated column name and Remove only single hash to get cleaner name. This will be uncommented once all the analysis are finished and we want to publish this data to public users.
##Converts spaces and punctuations to dots(.)
#names(data)<-make.names(variableLabels,unique=TRUE)
##Following code removes all punctuation marks too
##names(data)<-gsub("[ [:punct:]]", "" , variableLabels)
Noises that were introduced in data during typing or any phase of data collection are removed.
The actual question to the respondents begin from column index 5 and end at column no 202, so we will analyze frequency for culumn numbers from 5 to 202. All the figures are cannot be explained. The horizontal and vertical mean are not interpretable in every situation. Vertical mean is not interpreatable in nominal data, but interpretable in other data. skipping questions for involvement in institutions and trust basis for individual and institutions.
#cols 15:26=q11; cols 56:67=trust basis for individual and institution
#also remove other columns 55,86,180,194
skippedColumns<-c(5:14,27:54,56,67:85,87:179,181:193,195:202)
for(i in skippedColumns){
x<-data[,i]
#remove NA before calculating mean
x <- x[!is.na(x)]
#Remove "Don't Know" and NA from x
x<-x[x!="Don't know" & x!="Don't Know" & !is.na(x)]
#calculate frequency table
c<-count(x)
#find percent and mean of frequency
y<-cbind(c,"percent"=c[,2]/sum(c[2])*100)#,mean=mean(count$freq)
#order according to frequency and preserve order for printing
#y<-y[order(y$freq),]
#y$x<-factor(y$x,levels=y$x,ordered=TRUE)
#Horizontal and vertical mean
hm<-mean(y$percent) #mean of percentages
vm<-mean(as.numeric(x))
#Change NA to "Not Available"
#levels(y$x)<-c(levels(y$x),"Not Available")
#y[is.na(y$x),1]<-"Not Available"
#Remove NA after calculating percent
#y<-y[!is.na(y$x),]
#Plot factors x by percent
g<-ggplot(y,aes(x=x,y=percent))
g<-g+geom_bar(stat="identity",color="Red",fill="Maroon")
g<-g+labs(title=variableLabels[i],x=names(data[,i]),y="Percent")
g<-g+geom_text(aes(label=paste(round(percent,digits=2),"%",sep="")),size = 3, hjust = 0.5, vjust = -1, position ="stack")
g<-g+theme_bw()
g<-g+theme(axis.text.x=element_text(angle=45,vjust=1,hjust=1))
g<-g+geom_hline(aes(yintercept=hm))
#g<-g+geom_text(aes(0,m,label = m, vjust = -1))
#g<-g+scale_y_continuous(breaks = sort(c(seq(min(y$percent), max(y$percent), length.out=5), m)))
g<-g+geom_vline(aes(xintercept=vm))
print(g)
print("Frequency table")
print(y)
print("Horizontal Mean")
print(hm)
print("Vertical Mean")
print(vm)
}
## [1] "Frequency table"
## x freq percent
## 1 Male 1218 50.66556
## 2 Female 1186 49.33444
## [1] "Horizontal Mean"
## [1] 50
## [1] "Vertical Mean"
## [1] 1.493344
## [1] "Frequency table"
## x freq percent
## 1 18 10 0.41597338
## 2 19 27 1.12312812
## 3 20 47 1.95507488
## 4 21 57 2.37104825
## 5 22 56 2.32945092
## 6 23 47 1.95507488
## 7 24 51 2.12146423
## 8 25 58 2.41264559
## 9 26 59 2.45424293
## 10 27 49 2.03826955
## 11 28 69 2.87021631
## 12 29 50 2.07986689
## 13 30 64 2.66222962
## 14 31 63 2.62063228
## 15 32 59 2.45424293
## 16 33 61 2.53743760
## 17 34 55 2.28785358
## 18 35 70 2.91181364
## 19 36 54 2.24625624
## 20 37 38 1.58069884
## 21 38 58 2.41264559
## 22 39 52 2.16306156
## 23 40 54 2.24625624
## 24 41 41 1.70549085
## 25 42 66 2.74542429
## 26 43 48 1.99667221
## 27 44 43 1.78868552
## 28 45 66 2.74542429
## 29 46 41 1.70549085
## 30 47 63 2.62063228
## 31 48 51 2.12146423
## 32 49 55 2.28785358
## 33 50 44 1.83028286
## 34 51 51 2.12146423
## 35 52 38 1.58069884
## 36 53 43 1.78868552
## 37 54 35 1.45590682
## 38 55 52 2.16306156
## 39 56 44 1.83028286
## 40 57 31 1.28951747
## 41 58 30 1.24792013
## 42 59 26 1.08153078
## 43 60 34 1.41430948
## 44 61 28 1.16472546
## 45 62 29 1.20632280
## 46 63 20 0.83194676
## 47 64 27 1.12312812
## 48 65 26 1.08153078
## 49 66 21 0.87354409
## 50 67 11 0.45757072
## 51 68 16 0.66555740
## 52 69 16 0.66555740
## 53 70 19 0.79034942
## 54 71 10 0.41597338
## 55 72 10 0.41597338
## 56 73 5 0.20798669
## 57 74 5 0.20798669
## 58 75 10 0.41597338
## 59 76 4 0.16638935
## 60 77 5 0.20798669
## 61 78 7 0.29118136
## 62 79 5 0.20798669
## 63 80 4 0.16638935
## 64 81 2 0.08319468
## 65 82 2 0.08319468
## 66 83 2 0.08319468
## 67 84 1 0.04159734
## 68 85 2 0.08319468
## 69 86 2 0.08319468
## 70 88 1 0.04159734
## 71 89 1 0.04159734
## 72 90 1 0.04159734
## 73 91 1 0.04159734
## 74 92 1 0.04159734
## [1] "Horizontal Mean"
## [1] 1.351351
## [1] "Vertical Mean"
## [1] 41.8777
## [1] "Frequency table"
## x freq percent
## 1 Hindu 2162 89.933444
## 2 Buddhist 140 5.823627
## 3 Muslim 44 1.830283
## 4 Christian 25 1.039933
## 5 Others 33 1.372712
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 1.180948
## [1] "Frequency table"
## x freq percent
## 1 Migrated 786 33.12263
## 2 Not Migrated 1587 66.87737
## [1] "Horizontal Mean"
## [1] 50
## [1] "Vertical Mean"
## [1] 1.668774
## [1] "Frequency table"
## x freq percent
## 1 Illiterate 359 15.090374
## 2 Literate 424 17.822615
## 3 Primary Level 135 5.674653
## 4 Lower Secondary Level 178 7.482135
## 5 Secondary Level 398 16.729718
## 6 Higher Secondary Level 418 17.570408
## 7 Graduate Degree 330 13.871375
## 8 Master's Degree or Higher 137 5.758722
## [1] "Horizontal Mean"
## [1] 12.5
## [1] "Vertical Mean"
## [1] 4.299285
## [1] "Frequency table"
## x freq percent
## 1 Working 746 31.610169
## 2 Self-employed 424 17.966102
## 3 Unemployed 328 13.898305
## 4 Retired 96 4.067797
## 5 Student 218 9.237288
## 6 House wife 548 23.220339
## [1] "Horizontal Mean"
## [1] 16.66667
## [1] "Vertical Mean"
## [1] 3.110169
## [1] "Frequency table"
## x freq percent
## 1 Farmer 400 33.361134
## 2 Labor (skilled) 121 10.091743
## 3 Laborr (unskilled) 53 4.420350
## 4 Executive, Top management, Director 27 2.251877
## 5 Professional Lawyer, Doctor, Accountant, etc 41 3.419516
## 6 Professor - University 37 3.085905
## 7 Teacher - School 162 13.511259
## 8 Military service/police/security 33 2.752294
## 9 Public Servant 96 8.006672
## 10 Other 229 19.099249
## [1] "Horizontal Mean"
## [1] 10
## [1] "Vertical Mean"
## [1] 4.910759
## [1] "Frequency table"
## x freq percent
## 1 Private Firm 658 55.016722
## 2 Public Sector 203 16.973244
## 3 NGOs/Foundations/CBOs/Trade Unions/Civil Society 95 7.943144
## 4 Other 240 20.066890
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 1.930602
## [1] "Frequency table"
## x freq percent
## 1 200 7 0.5327245
## 2 300 1 0.0761035
## 3 400 1 0.0761035
## 4 500 14 1.0654490
## 5 600 3 0.2283105
## 6 1000 25 1.9025875
## 7 1100 1 0.0761035
## 8 1500 13 0.9893455
## 9 1790 1 0.0761035
## 10 2000 33 2.5114155
## 11 2200 1 0.0761035
## 12 2300 1 0.0761035
## 13 2500 14 1.0654490
## 14 3000 47 3.5768645
## 15 3500 3 0.2283105
## 16 4000 32 2.4353120
## 17 4300 1 0.0761035
## 18 4500 4 0.3044140
## 19 5000 110 8.3713851
## 20 5200 1 0.0761035
## 21 5500 2 0.1522070
## 22 6000 21 1.5981735
## 23 6500 1 0.0761035
## 24 6600 1 0.0761035
## 25 7000 40 3.0441400
## 26 7500 1 0.0761035
## 27 8000 46 3.5007610
## 28 8500 1 0.0761035
## 29 9000 14 1.0654490
## 30 9500 1 0.0761035
## 31 10000 163 12.4048706
## 32 10500 1 0.0761035
## 33 10700 1 0.0761035
## 34 11000 10 0.7610350
## 35 12000 56 4.2617960
## 36 13000 18 1.3698630
## 37 14000 10 0.7610350
## 38 14300 1 0.0761035
## 39 15000 144 10.9589041
## 40 15875 1 0.0761035
## 41 16000 30 2.2831050
## 42 16140 1 0.0761035
## 43 17000 26 1.9786910
## 44 17090 1 0.0761035
## 45 17500 1 0.0761035
## 46 18000 47 3.5768645
## 47 18570 1 0.0761035
## 48 18600 2 0.1522070
## 49 19000 8 0.6088280
## 50 19250 1 0.0761035
## 51 20000 117 8.9041096
## 52 20224 1 0.0761035
## 53 21000 8 0.6088280
## 54 22000 7 0.5327245
## 55 22180 1 0.0761035
## 56 22500 2 0.1522070
## 57 23000 4 0.3044140
## 58 23875 1 0.0761035
## 59 24000 2 0.1522070
## 60 24880 1 0.0761035
## 61 25000 54 4.1095890
## 62 26000 2 0.1522070
## 63 27000 2 0.1522070
## 64 28000 4 0.3044140
## 65 30000 47 3.5768645
## 66 31000 1 0.0761035
## 67 32000 5 0.3805175
## 68 35000 16 1.2176560
## 69 35450 1 0.0761035
## 70 36000 1 0.0761035
## 71 37000 1 0.0761035
## 72 38000 1 0.0761035
## 73 39000 1 0.0761035
## 74 40000 17 1.2937595
## 75 42000 1 0.0761035
## 76 44545 1 0.0761035
## 77 45000 5 0.3805175
## 78 50000 24 1.8264840
## 79 55000 3 0.2283105
## 80 60000 6 0.4566210
## 81 70000 3 0.2283105
## 82 80000 1 0.0761035
## 83 85000 1 0.0761035
## 84 100000 3 0.2283105
## 85 130000 1 0.0761035
## 86 200000 1 0.0761035
## 87 300000 1 0.0761035
## 88 500000 1 0.0761035
## 89 600000 1 0.0761035
## [1] "Horizontal Mean"
## [1] 1.123596
## [1] "Vertical Mean"
## [1] 15972.35
## [1] "Frequency table"
## x freq percent
## 1 Yes 958 40.64489
## 2 No 1399 59.35511
## [1] "Horizontal Mean"
## [1] 50
## [1] "Vertical Mean"
## [1] 1.593551
## [1] "Frequency table"
## x freq percent
## 1 Not religious at all 12 0.5104211
## 2 Not religious 88 3.7430880
## 3 Neutral 318 13.5261591
## 4 Religious 448 19.0557210
## 5 Very Religious 1438 61.1654615
## 6 Dontt know 47 1.9991493
## [1] "Horizontal Mean"
## [1] 16.66667
## [1] "Vertical Mean"
## [1] 4.426202
## [1] "Frequency table"
## x freq percent
## 1 1 Very Dissatisfied 93 3.892842
## 2 2 Satisfied 49 2.051067
## 3 3 Satisfied 152 6.362495
## 4 4 Satisfied 360 15.069067
## 5 5 Satisfied 482 20.175806
## 6 6 Satisfied 308 12.892424
## 7 7 Satisfied 302 12.641272
## 8 8 Satisfied 179 7.492675
## 9 9 Satisfied 147 6.153202
## 10 10 Very Satisfied 205 8.580996
## 11 Dont Know 112 4.688154
## [1] "Horizontal Mean"
## [1] 9.090909
## [1] "Vertical Mean"
## [1] 6.067811
## [1] "Frequency table"
## x freq percent
## 1 1 Very Dissatisfied 60 2.515723
## 2 2 Satisfied 40 1.677149
## 3 3 Satisfied 137 5.744235
## 4 4 Satisfied 262 10.985325
## 5 5 Satisfied 501 21.006289
## 6 6 Satisfied 378 15.849057
## 7 7 Satisfied 282 11.823899
## 8 8 Satisfied 258 10.817610
## 9 9 Satisfied 106 4.444444
## 10 10 Very Satisfied 193 8.092243
## 11 Dont Know 168 7.044025
## [1] "Horizontal Mean"
## [1] 9.090909
## [1] "Vertical Mean"
## [1] 6.348847
## [1] "Frequency table"
## x freq percent
## 1 1 Very Bad 194 8.120553
## 2 2 Good 80 3.348681
## 3 3 Good 152 6.362495
## 4 4 Good 285 11.929678
## 5 5 Good 485 20.301381
## 6 6 Good 349 14.608623
## 7 7 Good 310 12.976141
## 8 8 Good 187 7.827543
## 9 9 Good 51 2.134784
## 10 10 Very Good 105 4.395144
## 11 Dont Know 191 7.994977
## [1] "Horizontal Mean"
## [1] 9.090909
## [1] "Vertical Mean"
## [1] 5.753453
## [1] "Frequency table"
## x freq percent
## 1 1 Very Bad 51 2.135678
## 2 2 Good 67 2.805695
## 3 3 Good 102 4.271357
## 4 4 Good 198 8.291457
## 5 5 Good 363 15.201005
## 6 6 Good 268 11.222781
## 7 7 Good 283 11.850921
## 8 8 Good 323 13.525963
## 9 9 Good 247 10.343384
## 10 10 Very Good 154 6.448911
## 11 Dont Know 332 13.902848
## [1] "Horizontal Mean"
## [1] 9.090909
## [1] "Vertical Mean"
## [1] 6.987437
## [1] "Frequency table"
## x freq percent
## 1 1 Very Dissatisfied 133 5.595288
## 2 2 Satisfied 116 4.880101
## 3 3 Satisfied 218 9.171224
## 4 4 Satisfied 275 11.569205
## 5 5 Satisfied 461 19.394194
## 6 6 Satisfied 404 16.996214
## 7 7 Satisfied 301 12.663021
## 8 8 Satisfied 136 5.721498
## 9 9 Satisfied 77 3.239377
## 10 10 Very Satisfied 91 3.828355
## 11 Dont Know 165 6.941523
## [1] "Horizontal Mean"
## [1] 9.090909
## [1] "Vertical Mean"
## [1] 5.663021
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 526 22.25984
## 2 Quite Disagree 798 33.77063
## 3 Partly Agree 767 32.45874
## 4 Strongly Agree 272 11.51079
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.332205
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 299 12.843643
## 2 Quite Disagree 882 37.886598
## 3 Partly Agree 928 39.862543
## 4 Strongly Agree 219 9.407216
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.458333
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 874 37.286689
## 2 Quite Disagree 739 31.527304
## 3 Partly Agree 502 21.416382
## 4 Strongly Agree 229 9.769625
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.036689
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 219 10.584824
## 2 Not very much confidence 653 31.561141
## 3 Quite a lot of confidence 1061 51.280812
## 4 A great deal of confidence 136 6.573224
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.538424
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 157 7.374354
## 2 Not very much confidence 669 31.423203
## 3 Quite a lot of confidence 1135 53.311414
## 4 A great deal of confidence 168 7.891029
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.617191
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 77 3.57973
## 2 Not very much confidence 575 26.73175
## 3 Quite a lot of confidence 1259 58.53092
## 4 A great deal of confidence 240 11.15760
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.772664
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 501 21.973684
## 2 Not very much confidence 869 38.114035
## 3 Quite a lot of confidence 779 34.166667
## 4 A great deal of confidence 131 5.745614
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.236842
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 81 3.720717
## 2 Not very much confidence 423 19.430409
## 3 Quite a lot of confidence 1201 55.167662
## 4 A great deal of confidence 472 21.681213
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.948094
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 68 3.028953
## 2 Not very much confidence 386 17.193764
## 3 Quite a lot of confidence 1274 56.748330
## 4 A great deal of confidence 517 23.028953
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.997773
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 116 4.978541
## 2 Not very much confidence 548 23.519313
## 3 Quite a lot of confidence 1243 53.347639
## 4 A great deal of confidence 423 18.154506
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.846781
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 66 2.875817
## 2 Not very much confidence 428 18.649237
## 3 Quite a lot of confidence 1214 52.897603
## 4 A great deal of confidence 587 25.577342
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.011765
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 128 6.183575
## 2 Not very much confidence 731 35.314010
## 3 Quite a lot of confidence 1001 48.357488
## 4 A great deal of confidence 210 10.144928
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.624638
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 189 9.968354
## 2 Not very much confidence 642 33.860759
## 3 Quite a lot of confidence 889 46.888186
## 4 A great deal of confidence 176 9.282700
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.554852
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 155 7.69995
## 2 Not very much confidence 481 23.89468
## 3 Quite a lot of confidence 1031 51.21709
## 4 A great deal of confidence 346 17.18828
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.778937
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 40 1.760563
## 2 Not very much confidence 399 17.561620
## 3 Quite a lot of confidence 1422 62.588028
## 4 A great deal of confidence 411 18.089789
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.97007
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 41 1.812555
## 2 Not very much confidence 428 18.921309
## 3 Quite a lot of confidence 1467 64.854111
## 4 A great deal of confidence 326 14.412025
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.918656
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 74 3.175966
## 2 Not very much confidence 388 16.652361
## 3 Quite a lot of confidence 1502 64.463519
## 4 A great deal of confidence 366 15.708155
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.927039
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 27 1.189427
## 2 Not very much confidence 245 10.792952
## 3 Quite a lot of confidence 1251 55.110132
## 4 A great deal of confidence 747 32.907489
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.197357
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 27 1.253482
## 2 Not very much confidence 213 9.888579
## 3 Quite a lot of confidence 1148 53.296193
## 4 A great deal of confidence 766 35.561746
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.231662
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 44 1.901469
## 2 Not very much confidence 296 12.791703
## 3 Quite a lot of confidence 1176 50.821089
## 4 A great deal of confidence 798 34.485739
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.178911
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 24 1.067616
## 2 Not very much confidence 229 10.186833
## 3 Quite a lot of confidence 1229 54.670819
## 4 A great deal of confidence 766 34.074733
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.217527
## [1] "Frequency table"
## x freq percent
## 1 None at all confidence 102 5.007364
## 2 Not very much confidence 402 19.734904
## 3 Quite a lot of confidence 920 45.164458
## 4 A great deal of confidence 613 30.093274
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.003436
## [1] "Frequency table"
## x freq percent
## 1 Most people can be trusted 380 17.21014
## 2 Need to be careful in dealing with people 1828 82.78986
## [1] "Horizontal Mean"
## [1] 50
## [1] "Vertical Mean"
## [1] 1.827899
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 43 1.967963
## 2 Negative 181 8.283753
## 3 Not negative, not positive either 969 44.347826
## 4 Positive 926 42.379863
## 5 Very Positive 66 3.020595
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.362014
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 189 8.575318
## 2 Negative 551 25.000000
## 3 Not negative, not positive either 857 38.883848
## 4 Positive 576 26.134301
## 5 Very Positive 31 1.406534
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.867967
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 137 6.014047
## 2 Negative 428 18.788411
## 3 Not negative, not positive either 916 40.210711
## 4 Positive 747 32.791923
## 5 Very Positive 50 2.194908
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.063652
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 61 2.706300
## 2 Negative 269 11.934339
## 3 Not negative, not positive either 945 41.925466
## 4 Positive 904 40.106477
## 5 Very Positive 75 3.327418
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.294144
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 71 3.018707
## 2 Negative 259 11.011905
## 3 Not negative, not positive either 794 33.758503
## 4 Positive 1101 46.811224
## 5 Very Positive 127 5.399660
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.405612
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 41 1.823843
## 2 Negative 143 6.361210
## 3 Not negative, not positive either 716 31.850534
## 4 Positive 1177 52.357651
## 5 Very Positive 171 7.606762
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.575623
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 60 2.726034
## 2 Negative 205 9.313948
## 3 Not negative, not positive either 826 37.528396
## 4 Positive 940 42.707860
## 5 Very Positive 170 7.723762
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.433894
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 17 0.720950
## 2 Negative 87 3.689567
## 3 Not negative, not positive either 465 19.720102
## 4 Positive 1387 58.821035
## 5 Very Positive 402 17.048346
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.877863
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 10 0.4248088
## 2 Negative 77 3.2710280
## 3 Not negative, not positive either 487 20.6881903
## 4 Positive 1432 60.8326253
## 5 Very Positive 348 14.7833475
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.862787
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 23 0.990099
## 2 Negative 120 5.165734
## 3 Not negative, not positive either 653 28.110202
## 4 Positive 1169 50.322858
## 5 Very Positive 358 15.411106
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.739991
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 20 0.886918
## 2 Negative 95 4.212860
## 3 Not negative, not positive either 652 28.913525
## 4 Positive 1172 51.973392
## 5 Very Positive 316 14.013304
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.740133
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 53 2.538314
## 2 Negative 225 10.775862
## 3 Not negative, not positive either 889 42.576628
## 4 Positive 767 36.733716
## 5 Very Positive 154 7.375479
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.356322
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 52 2.407407
## 2 Negative 185 8.564815
## 3 Not negative, not positive either 883 40.879630
## 4 Positive 855 39.583333
## 5 Very Positive 185 8.564815
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.433333
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 88 3.841117
## 2 Negative 387 16.892187
## 3 Not negative, not positive either 1020 44.522043
## 4 Positive 678 29.594064
## 5 Very Positive 118 5.150589
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.153208
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 25 1.087903
## 2 Negative 130 5.657093
## 3 Not negative, not positive either 694 30.200174
## 4 Positive 1212 52.741514
## 5 Very Positive 237 10.313316
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.655352
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 13 0.5847953
## 2 Negative 104 4.6783626
## 3 Not negative, not positive either 635 28.5650022
## 4 Positive 1194 53.7112011
## 5 Very Positive 277 12.4606388
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.727845
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 35 1.666667
## 2 Negative 158 7.523810
## 3 Not negative, not positive either 897 42.714286
## 4 Positive 884 42.095238
## 5 Very Positive 126 6.000000
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.432381
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 25 1.124101
## 2 Negative 155 6.969424
## 3 Not negative, not positive either 854 38.399281
## 4 Positive 967 43.480216
## 5 Very Positive 223 10.026978
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.543165
## [1] "Frequency table"
## x freq percent
## 1 Very Negative 19 0.8467023
## 2 Negative 111 4.9465241
## 3 Not negative, not positive either 736 32.7985740
## 4 Positive 1128 50.2673797
## 5 Very Positive 250 11.1408200
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.659091
## [1] "Frequency table"
## x freq percent
## 1 Notat all proud 28 1.188960
## 2 Not very proud 111 4.713376
## 3 Quite proud 752 31.932059
## 4 Very proud 1464 62.165605
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.550743
## [1] "Frequency table"
## x freq percent
## 1 Notat all proud 363 16.72811
## 2 Not very proud 493 22.71889
## 3 Quite proud 691 31.84332
## 4 Very proud 623 28.70968
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.725346
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 289 13.190324
## 2 Quite Disagree 973 44.408946
## 3 Partly Agree 836 38.156093
## 4 Strongly Agree 93 4.244637
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.33455
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 112 4.938272
## 2 Quite Disagree 582 25.661376
## 3 Partly Agree 1029 45.370370
## 4 Strongly Agree 545 24.029982
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.884921
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 91 3.975535
## 2 Quite Disagree 442 19.309742
## 3 Partly Agree 1138 49.716033
## 4 Strongly Agree 618 26.998689
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.997379
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 215 9.598214
## 2 Quite Disagree 1121 50.044643
## 3 Partly Agree 734 32.767857
## 4 Strongly Agree 170 7.589286
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.383482
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 110 4.928315
## 2 Quite Disagree 787 35.259857
## 3 Partly Agree 1030 46.146953
## 4 Strongly Agree 305 13.664875
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.685484
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 236 10.442478
## 2 Quite Disagree 1061 46.946903
## 3 Partly Agree 793 35.088496
## 4 Strongly Agree 170 7.522124
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.396903
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 119 5.201049
## 2 Quite Disagree 679 29.676573
## 3 Partly Agree 1037 45.323427
## 4 Strongly Agree 453 19.798951
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.797203
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 331 14.600794
## 2 Quite Disagree 1167 51.477724
## 3 Partly Agree 611 26.951919
## 4 Strongly Agree 158 6.969563
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.262903
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 451 19.955752
## 2 Quite Disagree 1164 51.504425
## 3 Partly Agree 473 20.929204
## 4 Strongly Agree 172 7.610619
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.161947
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 140 6.499536
## 2 Quite Disagree 744 34.540390
## 3 Partly Agree 976 45.311049
## 4 Strongly Agree 294 13.649025
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.661096
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 91 4.028331
## 2 Quite Disagree 462 20.451527
## 3 Partly Agree 1087 48.118637
## 4 Strongly Agree 619 27.401505
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.988933
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 266 12.349118
## 2 Quite Disagree 957 44.428969
## 3 Partly Agree 732 33.983287
## 4 Strongly Agree 199 9.238626
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.401114
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 345 16.016713
## 2 Quite Disagree 1073 49.814299
## 3 Partly Agree 584 27.112349
## 4 Strongly Agree 152 7.056639
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.252089
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 261 12.111369
## 2 Quite Disagree 904 41.948956
## 3 Partly Agree 825 38.283063
## 4 Strongly Agree 165 7.656613
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.414849
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 457 20.632054
## 2 Quite Disagree 1084 48.939052
## 3 Partly Agree 498 22.483070
## 4 Strongly Agree 176 7.945824
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.177427
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 116 5.677925
## 2 Quite Disagree 287 14.047969
## 3 Partly Agree 1200 58.737151
## 4 Strongly Agree 440 21.536955
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.961331
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 321 16.30269
## 2 Quite Disagree 516 26.20620
## 3 Partly Agree 770 39.10615
## 4 Strongly Agree 362 18.38497
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.595734
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 428 22.11886
## 2 Quite Disagree 530 27.39018
## 3 Partly Agree 689 35.60724
## 4 Strongly Agree 288 14.88372
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.432558
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 868 45.660179
## 2 Quite Disagree 460 24.197791
## 3 Partly Agree 409 21.514992
## 4 Strongly Agree 164 8.627038
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 1.931089
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 1059 52.218935
## 2 Quite Disagree 432 21.301775
## 3 Partly Agree 345 17.011834
## 4 Strongly Agree 192 9.467456
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 1.837278
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 663 32.95229
## 2 Quite Disagree 464 23.06163
## 3 Partly Agree 557 27.68390
## 4 Strongly Agree 328 16.30219
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.27336
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 779 37.48797
## 2 Quite Disagree 461 22.18479
## 3 Partly Agree 603 29.01829
## 4 Strongly Agree 235 11.30895
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.141482
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 316 13.51583
## 2 Quite Disagree 555 23.73824
## 3 Partly Agree 901 38.53721
## 4 Strongly Agree 566 24.20873
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.734388
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 570 25.28838
## 2 Quite Disagree 750 33.27418
## 3 Partly Agree 684 30.34605
## 4 Strongly Agree 250 11.09139
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.272405
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 92 3.972366
## 2 Quite Disagree 358 15.457686
## 3 Partly Agree 1049 45.293610
## 4 Strongly Agree 817 35.276339
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.118739
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 56 2.437963
## 2 Quite Disagree 515 22.420549
## 3 Partly Agree 992 43.186765
## 4 Strongly Agree 734 31.954724
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.046582
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 330 15.00682
## 2 Quite Disagree 1080 49.11323
## 3 Partly Agree 605 27.51251
## 4 Strongly Agree 184 8.36744
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.292406
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 76 3.29575
## 2 Quite Disagree 398 17.25932
## 3 Partly Agree 1135 49.21943
## 4 Strongly Agree 697 30.22550
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.063747
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 259 11.470328
## 2 Quite Disagree 1198 53.055802
## 3 Partly Agree 655 29.007972
## 4 Strongly Agree 146 6.465899
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.304694
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 81 3.707094
## 2 Quite Disagree 486 22.242563
## 3 Partly Agree 1173 53.684211
## 4 Strongly Agree 445 20.366133
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.907094
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 82 3.587052
## 2 Quite Disagree 359 15.704287
## 3 Partly Agree 1101 48.162730
## 4 Strongly Agree 744 32.545932
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.096675
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 197 9.349786
## 2 Quite Disagree 695 32.985287
## 3 Partly Agree 828 39.297579
## 4 Strongly Agree 387 18.367347
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.666825
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 34 1.505091
## 2 Quite Disagree 229 10.137229
## 3 Partly Agree 974 43.116423
## 4 Strongly Agree 1022 45.241257
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.320938
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 50 2.343018
## 2 Quite Disagree 414 19.400187
## 3 Partly Agree 1072 50.234302
## 4 Strongly Agree 598 28.022493
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 3.039363
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 257 11.62896
## 2 Quite Disagree 868 39.27602
## 3 Partly Agree 817 36.96833
## 4 Strongly Agree 268 12.12670
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.495928
## [1] "Frequency table"
## x freq percent
## 1 Strongly Disagree 109 4.850912
## 2 Quite Disagree 532 23.676012
## 3 Partly Agree 1044 46.461949
## 4 Strongly Agree 562 25.011126
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.916333
## [1] "Frequency table"
## x freq percent
## 1 Very Low 213 11.222339
## 2 Low 438 23.076923
## 3 Mid 706 37.197050
## 4 Higher 373 19.652266
## 5 Very high 168 8.851423
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.918335
## [1] "Frequency table"
## x freq percent
## 1 Very Low 187 9.957401
## 2 Low 499 26.570820
## 3 Mid 722 38.445154
## 4 Higher 356 18.956337
## 5 Very high 114 6.070288
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.846113
## [1] "Frequency table"
## x freq percent
## 1 Very Low 166 8.700210
## 2 Low 453 23.742138
## 3 Mid 746 39.098532
## 4 Higher 391 20.492662
## 5 Very high 152 7.966457
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.95283
## [1] "Frequency table"
## x freq percent
## 1 Very Low 171 9.095745
## 2 Low 466 24.787234
## 3 Mid 696 37.021277
## 4 Higher 421 22.393617
## 5 Very high 126 6.702128
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.928191
## [1] "Frequency table"
## x freq percent
## 1 Very Low 101 4.827916
## 2 Low 400 19.120459
## 3 Mid 911 43.546845
## 4 Higher 549 26.242830
## 5 Very high 131 6.261950
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.099904
## [1] "Frequency table"
## x freq percent
## 1 Very Low 120 5.856515
## 2 Low 435 21.229868
## 3 Mid 879 42.898975
## 4 Higher 481 23.474866
## 5 Very high 134 6.539776
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.036115
## [1] "Frequency table"
## x freq percent
## 1 Very Low 98 4.803922
## 2 Low 405 19.852941
## 3 Mid 860 42.156863
## 4 Higher 526 25.784314
## 5 Very high 151 7.401961
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.111275
## [1] "Frequency table"
## x freq percent
## 1 Very Low 120 5.908419
## 2 Low 373 18.365337
## 3 Mid 817 40.226489
## 4 Higher 555 27.326440
## 5 Very high 166 8.173314
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.134909
## [1] "Frequency table"
## x freq percent
## 1 Very Low 101 4.735115
## 2 Low 383 17.955931
## 3 Mid 833 39.052977
## 4 Higher 643 30.145335
## 5 Very high 173 8.110642
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.189405
## [1] "Frequency table"
## x freq percent
## 1 Very Low 117 5.606133
## 2 Low 399 19.118352
## 3 Mid 878 42.069957
## 4 Higher 545 26.114039
## 5 Very high 148 7.091519
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.099665
## [1] "Frequency table"
## x freq percent
## 1 Very Low 95 4.528122
## 2 Low 375 17.874166
## 3 Mid 877 41.801716
## 4 Higher 572 27.264061
## 5 Very high 179 8.531935
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.173975
## [1] "Frequency table"
## x freq percent
## 1 Very Low 93 4.456157
## 2 Low 370 17.728797
## 3 Mid 838 40.153330
## 4 Higher 589 28.222329
## 5 Very high 197 9.439387
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.2046
## [1] "Frequency table"
## x freq percent
## 1 Very Low 108 5.224964
## 2 Low 479 23.173682
## 3 Mid 810 39.187228
## 4 Higher 499 24.141268
## 5 Very high 171 8.272859
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.070634
## [1] "Frequency table"
## x freq percent
## 1 Very Low 114 5.711423
## 2 Low 496 24.849699
## 3 Mid 786 39.378758
## 4 Higher 443 22.194389
## 5 Very high 157 7.865731
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.016533
## [1] "Frequency table"
## x freq percent
## 1 Very Low 99 4.915591
## 2 Low 458 22.740814
## 3 Mid 798 39.622642
## 4 Higher 473 23.485601
## 5 Very high 186 9.235353
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.093843
## [1] "Frequency table"
## x freq percent
## 1 Very Low 118 5.926670
## 2 Low 474 23.807132
## 3 Mid 784 39.377197
## 4 Higher 449 22.551482
## 5 Very high 166 8.337519
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.03566
## [1] "Frequency table"
## x freq percent
## 1 Very Low 102 4.726599
## 2 Low 477 22.103800
## 3 Mid 743 34.430028
## 4 Higher 626 29.008341
## 5 Very high 210 9.731233
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.169138
## [1] "Frequency table"
## x freq percent
## 1 Very Low 109 5.222808
## 2 Low 513 24.580738
## 3 Mid 729 34.930522
## 4 Higher 558 26.736943
## 5 Very high 178 8.528989
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.087686
## [1] "Frequency table"
## x freq percent
## 1 Very Low 87 4.125178
## 2 Low 441 20.910384
## 3 Mid 745 35.324798
## 4 Higher 645 30.583215
## 5 Very high 191 9.056425
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.195353
## [1] "Frequency table"
## x freq percent
## 1 Very Low 106 5.160662
## 2 Low 505 24.586173
## 3 Mid 740 36.027264
## 4 Higher 516 25.121714
## 5 Very high 187 9.104187
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.084226
## [1] "Frequency table"
## x freq percent
## 1 Very Low 106 5.480869
## 2 Low 422 21.820062
## 3 Mid 750 38.779731
## 4 Higher 497 25.698035
## 5 Very high 159 8.221303
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.093588
## [1] "Frequency table"
## x freq percent
## 1 Very Low 114 6.057386
## 2 Low 414 21.997875
## 3 Mid 742 39.426142
## 4 Higher 462 24.548353
## 5 Very high 150 7.970244
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.063762
## [1] "Frequency table"
## x freq percent
## 1 Very Low 107 5.625657
## 2 Low 380 19.978970
## 3 Mid 767 40.325973
## 4 Higher 488 25.657203
## 5 Very high 160 8.412198
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.112513
## [1] "Frequency table"
## x freq percent
## 1 Very Low 96 5.095541
## 2 Low 393 20.859873
## 3 Mid 719 38.163482
## 4 Higher 494 26.220807
## 5 Very high 182 9.660297
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.144904
## [1] "Frequency table"
## x freq percent
## 1 Very Low 112 5.608413
## 2 Low 384 19.228843
## 3 Mid 751 37.606410
## 4 Higher 557 27.891838
## 5 Very high 193 9.664497
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.167752
## [1] "Frequency table"
## x freq percent
## 1 Very Low 112 5.740646
## 2 Low 414 21.219887
## 3 Mid 739 37.878011
## 4 Higher 498 25.525372
## 5 Very high 188 9.636084
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.120964
## [1] "Frequency table"
## x freq percent
## 1 Very Low 101 5.184805
## 2 Low 361 18.531828
## 3 Mid 768 39.425051
## 4 Higher 527 27.053388
## 5 Very high 191 9.804928
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.177618
## [1] "Frequency table"
## x freq percent
## 1 Very Low 129 6.652914
## 2 Low 392 20.216606
## 3 Mid 716 36.926251
## 4 Higher 511 26.353791
## 5 Very high 191 9.850438
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.125322
## [1] "Frequency table"
## x freq percent
## 1 Very Low 51 2.491451
## 2 Low 259 12.652662
## 3 Mid 669 32.681974
## 4 Higher 689 33.659013
## 5 Very high 379 18.514900
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.530532
## [1] "Frequency table"
## x freq percent
## 1 Very Low 48 2.409639
## 2 Low 263 13.202811
## 3 Mid 718 36.044177
## 4 Higher 617 30.973896
## 5 Very high 346 17.369478
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.476908
## [1] "Frequency table"
## x freq percent
## 1 Very Low 47 2.405322
## 2 Low 230 11.770727
## 3 Mid 719 36.796315
## 4 Higher 634 32.446264
## 5 Very high 324 16.581372
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.490276
## [1] "Frequency table"
## x freq percent
## 1 Very Low 66 3.407331
## 2 Low 274 14.145586
## 3 Mid 690 35.622096
## 4 Higher 614 31.698503
## 5 Very high 293 15.126484
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.409912
## [1] "Frequency table"
## x freq percent
## 1 Very bad 118 5.047049
## 2 Bad 234 10.008554
## 3 Not bad, not good 883 37.767322
## 4 Good 926 39.606501
## 5 Very good 177 7.570573
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.34645
## [1] "Frequency table"
## x freq percent
## 1 Very bad 63 2.688860
## 2 Bad 191 8.151942
## 3 Not bad, not good 853 36.406317
## 4 Good 1079 46.052070
## 5 Very good 157 6.700811
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.45924
## [1] "Frequency table"
## x freq percent
## 1 Very bad 54 2.352941
## 2 Bad 122 5.315904
## 3 Not bad, not good 828 36.078431
## 4 Good 1109 48.322440
## 5 Very good 182 7.930283
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.541612
## [1] "Frequency table"
## x freq percent
## 1 Very bad 53 2.402539
## 2 Bad 133 6.029012
## 3 Not bad, not good 801 36.310063
## 4 Good 1017 46.101541
## 5 Very good 202 9.156845
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.535811
## [1] "Frequency table"
## x freq percent
## 1 Very bad 52 2.460956
## 2 Bad 130 6.152390
## 3 Not bad, not good 715 33.838145
## 4 Good 978 46.284903
## 5 Very good 238 11.263606
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.577378
## [1] "Frequency table"
## x freq percent
## 1 Very bad 55 2.467474
## 2 Bad 164 7.357559
## 3 Not bad, not good 819 36.742934
## 4 Good 936 41.991925
## 5 Very good 255 11.440108
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.525796
## [1] "Frequency table"
## x freq percent
## 1 Very bad 69 3.021016
## 2 Bad 266 11.646235
## 3 Not bad, not good 947 41.462347
## 4 Good 817 35.770578
## 5 Very good 185 8.099825
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.34282
## [1] "Frequency table"
## x freq percent
## 1 Very bad 67 2.928322
## 2 Bad 249 10.882867
## 3 Not bad, not good 816 35.664336
## 4 Good 890 38.898601
## 5 Very good 266 11.625874
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.454108
## [1] "Frequency table"
## x freq percent
## 1 Very bad 110 5.169173
## 2 Bad 437 20.535714
## 3 Not bad, not good 1011 47.509398
## 4 Good 473 22.227444
## 5 Very good 97 4.558271
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.004699
## [1] "Frequency table"
## x freq percent
## 1 Very bad 513 21.83908
## 2 Bad 780 33.20562
## 3 Not bad, not good 686 29.20392
## 4 Good 286 12.17539
## 5 Very good 84 3.57599
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.424436
## [1] "Frequency table"
## x freq percent
## 1 Very bad 344 14.776632
## 2 Bad 803 34.493127
## 3 Not bad, not good 746 32.044674
## 4 Good 351 15.077320
## 5 Very good 84 3.608247
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.582474
## [1] "Frequency table"
## x freq percent
## 1 Very bad 387 16.602317
## 2 Bad 836 35.864436
## 3 Not bad, not good 734 31.488631
## 4 Good 299 12.827113
## 5 Very good 75 3.217503
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.501931
## [1] "Frequency table"
## x freq percent
## 1 Very bad 381 16.302953
## 2 Bad 827 35.387249
## 3 Not bad, not good 721 30.851519
## 4 Good 339 14.505777
## 5 Very good 69 2.952503
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.524176
## [1] "Frequency table"
## x freq percent
## 1 Very bad 360 15.483871
## 2 Bad 836 35.956989
## 3 Not bad, not good 720 30.967742
## 4 Good 335 14.408602
## 5 Very good 74 3.182796
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.538495
## [1] "Frequency table"
## x freq percent
## 1 Very bad 395 16.865927
## 2 Bad 809 34.543126
## 3 Not bad, not good 587 25.064048
## 4 Good 450 19.214347
## 5 Very good 101 4.312553
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.595645
## [1] "Frequency table"
## x freq percent
## 1 Very bad 433 18.736478
## 2 Bad 789 34.141064
## 3 Not bad, not good 683 29.554305
## 4 Good 338 14.625703
## 5 Very good 68 2.942449
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.488966
## [1] "Frequency table"
## x freq percent
## 1 Very bad 150 6.593407
## 2 Bad 454 19.956044
## 3 Not bad, not good 1033 45.406593
## 4 Good 528 23.208791
## 5 Very good 110 4.835165
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.997363
## [1] "Frequency table"
## x freq percent
## 1 Very bad 146 6.428886
## 2 Bad 458 20.167327
## 3 Not bad, not good 975 42.932629
## 4 Good 601 26.464113
## 5 Very good 91 4.007045
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.014531
## [1] "Frequency table"
## x freq percent
## 1 Very bad 50 2.219263
## 2 Bad 188 8.344430
## 3 Not bad, not good 802 35.596982
## 4 Good 940 41.722148
## 5 Very good 273 12.117177
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.531735
## [1] "Frequency table"
## x freq percent
## 1 Very bad 41 1.781834
## 2 Bad 198 8.604954
## 3 Not bad, not good 694 30.160800
## 4 Good 1097 47.674924
## 5 Very good 271 11.777488
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.590613
## [1] "Frequency table"
## x freq percent
## 1 Very bad 86 3.928735
## 2 Bad 347 15.851987
## 3 Not bad, not good 889 40.612152
## 4 Good 735 33.576976
## 5 Very good 132 6.030151
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.219278
## [1] "Frequency table"
## x freq percent
## 1 Very bad 170 7.548845
## 2 Bad 468 20.781528
## 3 Not bad, not good 918 40.763766
## 4 Good 573 25.444050
## 5 Very good 123 5.461812
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.004885
## [1] "Frequency table"
## x freq percent
## 1 Very bad 148 6.595365
## 2 Bad 474 21.122995
## 3 Not bad, not good 956 42.602496
## 4 Good 541 24.108734
## 5 Very good 125 5.570410
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.009358
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 44 1.899007
## 2 Succeeded quite well 410 17.695296
## 3 Neither succeeded nor failed 499 21.536470
## 4 Did not quite succeed 805 34.743202
## 5 Did not succeed at all 559 24.126025
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.615019
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 34 1.465517
## 2 Succeeded quite well 343 14.784483
## 3 Neither succeeded nor failed 514 22.155172
## 4 Did not quite succeed 1003 43.232759
## 5 Did not succeed at all 426 18.362069
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.622414
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 30 1.318102
## 2 Succeeded quite well 336 14.762742
## 3 Neither succeeded nor failed 549 24.121265
## 4 Did not quite succeed 937 41.168717
## 5 Did not succeed at all 424 18.629174
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.610281
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 49 2.128584
## 2 Succeeded quite well 168 7.298002
## 3 Neither succeeded nor failed 487 21.155517
## 4 Did not quite succeed 801 34.795830
## 5 Did not succeed at all 797 34.622068
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.924848
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 39 1.759928
## 2 Succeeded quite well 305 13.763538
## 3 Neither succeeded nor failed 555 25.045126
## 4 Did not quite succeed 874 39.440433
## 5 Did not succeed at all 443 19.990975
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.62139
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 251 10.856401
## 2 Succeeded quite well 1119 48.399654
## 3 Neither succeeded nor failed 501 21.669550
## 4 Did not quite succeed 338 14.619377
## 5 Did not succeed at all 103 4.455017
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.53417
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 49 2.171986
## 2 Succeeded quite well 288 12.765957
## 3 Neither succeeded nor failed 527 23.359929
## 4 Did not quite succeed 759 33.643617
## 5 Did not succeed at all 633 28.058511
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.726507
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 68 3.047961
## 2 Succeeded quite well 479 21.470193
## 3 Neither succeeded nor failed 595 26.669655
## 4 Did not quite succeed 752 33.706858
## 5 Did not succeed at all 337 15.105334
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.363514
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 60 2.74223
## 2 Succeeded quite well 579 26.46252
## 3 Neither succeeded nor failed 655 29.93601
## 4 Did not quite succeed 666 30.43876
## 5 Did not succeed at all 228 10.42048
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.193327
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 38 1.769912
## 2 Succeeded quite well 341 15.882627
## 3 Neither succeeded nor failed 719 33.488589
## 4 Did not quite succeed 745 34.699581
## 5 Did not succeed at all 304 14.159292
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.435957
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 54 2.525725
## 2 Succeeded quite well 368 17.212348
## 3 Neither succeeded nor failed 665 31.103835
## 4 Did not quite succeed 719 33.629560
## 5 Did not succeed at all 332 15.528531
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.424228
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 39 1.744186
## 2 Succeeded quite well 298 13.327370
## 3 Neither succeeded nor failed 610 27.280859
## 4 Did not quite succeed 825 36.896243
## 5 Did not succeed at all 464 20.751342
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.615832
## [1] "Frequency table"
## x freq percent
## 1 Succeeded very well 189 8.337009
## 2 Succeeded quite well 961 42.390825
## 3 Neither succeeded nor failed 560 24.702250
## 4 Did not quite succeed 441 19.453022
## 5 Did not succeed at all 116 5.116895
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.70622
## [1] "Frequency table"
## x freq percent
## 1 Very inefficient 393 17.064698
## 2 Quite inefficient 496 21.537125
## 3 Neither efficient nor inefficient 657 28.528007
## 4 Quite efficient 721 31.306991
## 5 Very efficient 36 1.563178
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.787668
## [1] "Frequency table"
## x freq percent
## 1 Very inefficient 257 11.130359
## 2 Quite inefficient 504 21.827631
## 3 Neither efficient nor inefficient 711 30.792551
## 4 Quite efficient 781 33.824166
## 5 Very efficient 56 2.425292
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.945864
## [1] "Frequency table"
## x freq percent
## 1 Very inefficient 290 12.494614
## 2 Quite inefficient 436 18.785006
## 3 Neither efficient nor inefficient 556 23.955192
## 4 Quite efficient 942 40.585954
## 5 Very efficient 97 4.179233
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.051702
## [1] "Frequency table"
## x freq percent
## 1 None 34 1.521253
## 2 Just a few 431 19.284116
## 3 Some 507 22.684564
## 4 Quite many 808 36.152125
## 5 Everyone 455 20.357942
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.545414
## [1] "Frequency table"
## x freq percent
## 1 None 79 3.607306
## 2 Just a few 602 27.488584
## 3 Some 648 29.589041
## 4 Quite many 616 28.127854
## 5 Everyone 245 11.187215
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 3.157991
## [1] "Frequency table"
## x freq percent
## 1 Never 786 41.719745
## 2 Seldom 219 11.624204
## 3 Sometimes 570 30.254777
## 4 Quite often 238 12.632696
## 5 Very often 71 3.768577
## [1] "Horizontal Mean"
## [1] 20
## [1] "Vertical Mean"
## [1] 2.251062
## [1] "Frequency table"
## x freq percent
## 1 Not at all interested 473 21.040925
## 2 Not interested 536 23.843416
## 3 Somewhat interested 1057 47.019573
## 4 Very interested 182 8.096085
## [1] "Horizontal Mean"
## [1] 25
## [1] "Vertical Mean"
## [1] 2.421708
## [1] "Frequency table"
## x freq percent
## 1 Nepali Congress 902 46.4708913
## 2 CPN (UML) 507 26.1205564
## 3 UCPN (Maoist) 197 10.1494075
## 4 CPN (Maoist) 70 3.6063885
## 5 Nepal Majdur Kisan Party 16 0.8243174
## 6 Rastriya Janamorcha, Nepal 15 0.7727975
## 7 Rastra Prajatantra Party, Nepal 61 3.1427099
## 8 Rastriya Prajatantra Party 20 1.0303967
## 9 Madheshi janadhikar Forum, Democratic 28 1.4425554
## 10 Madheshi Janadhikar Forum 15 0.7727975
## 11 National People's front, Nepal 29 1.4940752
## 12 Sanghiya Samajbadi Party 20 1.0303967
## 13 Other 61 3.1427099
## [1] "Horizontal Mean"
## [1] 7.692308
## [1] "Vertical Mean"
## [1] 2.760948
q11<-data[,15:26]
for(i in 1:length(q11)){q11[,i]<-as.numeric(q11[,i])}
###Combine all q11 columns to one
#define new column to store all data
q11$new<-0
#replace all NAs with 0
q11[is.na(q11)]<-0
#define temp as logical
tmp<-q11[1:11]==1
#gives col index for last match
q11$new[row(tmp)[tmp]]<-col(tmp)[tmp]
#remove all data and put only one column
q11<-q11$new
#now change 0 in q11 to 12 because with a[0]
#subscript out of bounds error occur
q11[q11==0]<-12
#Now define variable labels
varlabels<-c("NGO","INGO","Trade Union","Student Union","Voluntary Organization","Community Organization","Religious Orginization","Cultural Organization","International Organization","Political Institution","Others","Not available")
varlabels<-as.data.frame(varlabels)
#To preserve the original order of varlabels
#varlabels$varlabels<-factor(varlabels$varlabels,levels=varlabels$varlabels,ordered=TRUE)
#now apply descriptive labels to q11
q11<-varlabels[q11,1]
#Now remove "Not available" column for plotting
plotData<-q11[q11!="Not available"]
#Now calculate freq and percentages from factor variable q11
invcount<-count(plotData)
#find percent and mean of frequency
y<-cbind(invcount,"percent"=invcount[,2]/sum(invcount[2])*100)
y<-as.data.frame(y)
#order according to freq and preserve order for plotting
y<-y[order(y$freq),]
y$x<-factor(y$x,levels=y$x,ordered=TRUE)
y
## x freq percent
## 4 International Organization 5 0.5055612
## 3 INGO 11 1.1122346
## 2 Cultural Organization 33 3.3367037
## 6 Others 41 4.1456016
## 10 Trade Union 45 4.5500506
## 11 Voluntary Organization 65 6.5722952
## 9 Student Union 76 7.6845298
## 7 Political Institution 98 9.9089990
## 8 Religious Orginization 106 10.7178969
## 5 NGO 108 10.9201213
## 1 Community Organization 401 40.5460061
plot(y$x,y$freq)
g<-ggplot(y,aes(x,percent,order=percent))
g<-g+geom_bar(color="Red",fill="Salmon",stat="identity")
g<-g+labs(title="Involvement in Institutions",x="Institutions",y="Frequency")
g<-g+theme_bw()
g<-g+theme(axis.text.x=element_text(angle=45,vjust=1,hjust=1))
g<-g+geom_text(aes(label=paste(round(percent,digits=2),"%",sep="")),size = 3, hjust = 0.5, vjust = -1, position ="stack")
print(g)
## ymax not defined: adjusting position using y instead
library(ggplot2)
trustPeople<-data.frame(Col=unlist(data[,57:61]))
trustPeople<-as.data.frame(trustPeople[!is.na(trustPeople$Col),])
names(trustPeople)<-c("x")
#sort(unique(bq21))
d<-count(trustPeople)
#find percent and mean of frequency
y<-cbind(d,"percent"=d[,2]/sum(d[2])*100)
y<-as.data.frame(y)
#order according to freq and preserve order for plotting
#not done for this because variable label looks garbage
#y<-y[order(y$freq),]
#y$x<-factor(y$x,levels=y$x,ordered=TRUE)
y
## x freq percent
## 1 Don't Know 31 0.45736205
## 2 Good/Great 173 2.55237533
## 3 Honest 677 9.98819711
## 4 Liberal 32 0.47211567
## 5 Laborious / Industrious 523 7.71614045
## 6 Efficient 149 2.19828858
## 7 Responsible 53 0.78194158
## 8 Power deligator 6 0.08852169
## 9 Accountable 57 0.84095603
## 10 Neutral 24 0.35408675
## 11 Rich / Independent 60 0.88521688
## 12 Patriotic 3 0.04426084
## 13 Religious 91 1.34257893
## 14 Benevolent 50 0.73768073
## 15 Idealastic / ethical 207 3.05399823
## 16 Leadership 16 0.23605783
## 17 Justice 15 0.22130422
## 18 Educated / Academic 310 4.57362054
## 19 Relative / Friend 474 6.99321334
## 20 Transparent 63 0.92947772
## 21 Logical 17 0.25081145
## 22 Behaviour 1281 18.89938035
## 23 Practical 143 2.10976689
## 24 Known / Familiar 335 4.94246090
## 25 Corruption Free 35 0.51637651
## 26 Kindness 162 2.39008557
## 27 Creative / Genuine 35 0.51637651
## 28 Service Delivery 97 1.43110062
## 29 Security 28 0.41310121
## 30 Social 124 1.82944821
## 31 Helpful / Cooperative 324 4.78017114
## 32 Constitutional Body 37 0.54588374
## 33 Troubleshooter 10 0.14753615
## 34 Popular 81 1.19504279
## 35 Truthfulness 524 7.73089407
## 36 Other 531 7.83416937
#plot(y$x,y$freq)
g<-ggplot(y,aes(x,percent,order=percent))
g<-g+geom_bar(color="Red",fill="Salmon",stat="identity")
g<-g+labs(title="Trust characteristics for individual",x="Trust Basis",y="Percent")
g<-g+theme_bw()
g<-g+theme(axis.text.x=element_text(angle=45,vjust=1,hjust=1))
g<-g+geom_text(aes(label=paste(round(percent,digits=2),"%",sep="")),size = 3, hjust = 0.5, vjust = -1, position ="stack")
print(g)
## ymax not defined: adjusting position using y instead
trustInst<-data.frame(Col=unlist(data[,62:66]))
trustInst<-as.data.frame(trustInst[!is.na(trustInst$Col),])
names(trustInst)<-c("x")
#clean data
#trustInst<-trustInst[trustInst<38,1]
#sort(unique(bq21))
d<-count(trustInst)
#find percent and mean of frequency
y<-cbind(d,"percent"=d[,2]/sum(d[2])*100)
y<-as.data.frame(y)
#order according to freq and preserve order for plotting
#not done for this because variable label looks garbage
#y<-y[order(y$freq),]
#y$x<-factor(y$x,levels=y$x,ordered=TRUE)
y
## x freq percent
## 1 Don't Know 69 0.97789116
## 2 Good/Great 31 0.43934240
## 3 Honest 315 4.46428571
## 4 Liberal 48 0.68027211
## 5 Laborious / Industrious 610 8.64512472
## 6 Efficient 366 5.18707483
## 7 Responsible 104 1.47392290
## 8 Power deligator 38 0.53854875
## 9 Accountable 301 4.26587302
## 10 Neutral 200 2.83446712
## 11 Rich / Independent 33 0.46768707
## 12 Patriotic 46 0.65192744
## 13 Religious 6 0.08503401
## 14 Benevolent 77 1.09126984
## 15 Idealastic / ethical 220 3.11791383
## 16 Leadership 76 1.07709751
## 17 Justice 231 3.27380952
## 18 Educated / Academic 59 0.83616780
## 19 Relative / Friend 62 0.87868481
## 20 Transparent 327 4.63435374
## 21 Logical 7 0.09920635
## 22 Behaviour 250 3.54308390
## 23 Practical 76 1.07709751
## 24 Known / Familiar 42 0.59523810
## 25 Corruption Free 257 3.64229025
## 26 Kindness 31 0.43934240
## 27 Creative / Genuine 17 0.24092971
## 28 Service Delivery 1312 18.59410431
## 29 Security 394 5.58390023
## 30 Social 64 0.90702948
## 31 Helpful / Cooperative 330 4.67687075
## 32 Constitutional Body 124 1.75736961
## 33 Troubleshooter 85 1.20464853
## 34 Popular 85 1.20464853
## 35 Truthfulness 154 2.18253968
## 36 Other 609 8.63095238
g<-ggplot(y,aes(x,percent))
g<-g+geom_bar(color="Red",fill="Salmon",stat="identity")
g<-g+labs(title="Trust Basis for Institutions",x="Quality",y="Percent")
g<-g+theme_bw()
g<-g+theme(axis.text.x=element_text(angle=45,vjust=1,hjust=1))
g<-g+geom_text(aes(label=paste(round(percent,digits=2),"%",sep="")),size = 3, hjust = 0.5, vjust = -1, position ="stack")
print(g)
## ymax not defined: adjusting position using y instead
qplot(data$bq33,data=data,fill=data$aq1,xlab="Have You ever been asked for bribe?")
qplot(data$bq32b,data=data,fill=data$bq18a,xlab="Level of Corruption")
qplot(data$bq32b,data=data,fill=data$bq18b,xlab="Level of Corruption")
qplot(data$bq32b,data=data,fill=data$bq18c,xlab="Level of Corruption")
All the data is not necessary to print on html file. It will be printed on csv file, which can be further processed in any data analysis software.